package com.songcha.module_main.ui.fragment.gongde_rank

import android.app.Application
import com.songcha.library_base.interfaces.IApiResult
import com.songcha.library_base.mvvm.base.BaseViewModel
import com.songcha.module_memo.bean.wooden_fish.QmyRankBean
import kotlinx.coroutines.flow.MutableStateFlow

class GongDeRankViewModel(app:Application):BaseViewModel<GongDeRankRepository>(app) {
    val rankBean = MutableStateFlow<QmyRankBean.DataBean?>(null)

    fun getQmyRankList(){
        handleApiDataObserver(repository.getQmyRankList(),object: IApiResult<QmyRankBean> {
            override fun onSuccess(bean: QmyRankBean) {
                rankBean.value = bean.data
            }

        },true)
    }
}